<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  var date = new Date(Date.now() + 24 * 3600 * 1000)
  document.cookie = 'name=grh;expires=' + date
  /**
   *存储大小
   *cookie ：由于浏览的限制只能存储4k左右
   *localStorage 和 sessionStorage 存储在5M左右
   *易用性
   *相对于webStorage的语义性较弱
   *是否携带http
   * cookie在客户端与服务端之间传送
   * storage存在本地
  */
</script>

</html>